Explicit Substitutions for Contextual Type Theory
نویسندگان
چکیده
In this paper, we present an explicit substitution calculus which distinguishes between ordinary bound variables and meta-variables. Its typing discipline is derived from contextual modal type theory. We first present a dependently typed lambda calculus with explicit substitutions for ordinary variables and explicit meta-substitutions for meta-variables. We then present a weak head normalization procedure which performs both substitutions lazily and in a single pass thereby combining substitution walks for the two different classes of variables. Finally, we describe a bidirectional type checking algorithm which uses weak head normalization and prove soundness.
منابع مشابه
Functional Programming With Higher-order Abstract Syntax and Explicit Substitutions
This paper sketches a foundation for programming with higher-order abstract syntax and explicit substitutions based on contextual modal type theory [NPP05]. Contextual modal types not only allows us to cleanly separate the representation of data objects from computation, but allow us to recurse over data objects with free variables. In this paper, we extend these ideas even further by adding fi...
متن کاملExplicit Substitutions and Programming Languages
The λ-calculus has been much used to study the theory of substitution in logical systems and programming languages. However, with explicit substitutions, it is possible to get finer properties with respect to gradual implementations of substitutions as effectively done in runtimes of programming languages. But the theory of explicit substitutions has some defects such as non-confluence or the n...
متن کاملHigher-Order Equational Unification via Explicit Substitutions
We show how to reduce the uniication problem modulo-conversion and a rst-order equational theory E, into a rst-order uni-cation problem in a union of two non-disjoint equational theories including E and a calculus of explicit substitutions. A rule-based uniica-tion procedure in this combined theory is described and may be viewed as an extension of the one initially designed by G. Dowek, T. Hard...
متن کاملA Theory of Explicit Substitutions with Safe and Full Composition
Many different systems with explicit substitutions have been proposed to implement a large class of higher-order languages. Motivations and challenges that guided the development of such calculi in functional frameworks are surveyed in the first part of this paper. Then, very simple technology in named variable-style notation is used to establish a theory of explicit substitutions for the lambd...
متن کاملOn the Syntax of Dependent Types and the Coherence Problem (working Draft)
We discuss diierent ways to represent the syntax of dependent types using Martin-LL of type theory as a metalanguage. In particular, we show how to give an intrinsic syntax in which meaningful contexts, types in a context, and terms of a certain type in a context, are generated directly without rst introducing raw terms, types, and contexts. In the rst representation we deene inductively the no...
متن کامل